package com.learn.annotation_config.configuration.imports;

import com.alibaba.druid.pool.DruidDataSource;
import org.springframework.context.annotation.Bean;

// @Component
public class ImportConfiguration1 {
    @Bean
    public DruidDataSource dataSource() {
        DruidDataSource dataSource = new DruidDataSource();
        dataSource.setDriverClassName("com.mysql.jdbc.Driver");
        dataSource.setUrl("jdbc:mysql://localhost:3306/learn_sql");
        dataSource.setUsername("root");
        dataSource.setPassword("makabaka");
        return dataSource;
    }
}
